//
//  RTNavigationController.h
//  AutobotsPlugin
//
//  Created by 张志恒 on 16/11/7.
//  Copyright © 2016年 Autohome. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RTNavigationBar.h"

typedef void(^RTNavigationPopGestureDidBegin)(void);
typedef void(^RTNavigationPopGestureInProgress)(CGFloat progress);
typedef void(^RTNavigationPopGestureDidEnd)(BOOL finished);

@interface RTNavigationController : UINavigationController

@end

@interface UIViewController (RTFullscreenPopGesture)

/**
 侧滑返回手势是否可用
 */
@property (nonatomic, assign) BOOL rt_interactivePopDisabled;

/**
 可左滑返回的区域，默认为屏幕宽度
 */
@property (nonatomic, assign) CGFloat rt_interactivePopMaxAllowedInitialDistanceToLeftEdge;

/**
 侧滑返回手势已经开始的回调block
 */
@property (nonatomic, copy) RTNavigationPopGestureDidBegin rt_popGestureBeginBlock;

/**
 侧滑返回手势正在进行的回调block
 */
@property (nonatomic, copy) RTNavigationPopGestureInProgress rt_popGestureInProgress;

/**
 侧滑返回手势已经结束的回调block
 */
@property (nonatomic, copy) RTNavigationPopGestureDidEnd rt_popGestureEndBlock;

@end

@interface UIView (RTSnapshot)

- (UIImage *)rt_snapshot;

@end
